<%--
  Created by IntelliJ IDEA.
  User: lsh
  Date: 2020/8/29
  Time: 15:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>$Title$</title>
    <script type="text/javascript" src="js/jquery-3.5.1.js"></script>
  </head>
  <body>
  $END$
  <form action="/Login_demo/login" >
  用户名 ：<input id="username" type="text"  name="username" ><br>
    密码 ：<input id="password" type="password" name="password"><br>
    <input type="submit" value="登入"><br>
    <input id="js_login" type="button" value="js登入" ><br>

  </form>
  </body>
<script>
  $("#js_login").click(function () {
    var username = $("#username").val();
    var password = $("#password").val();
    //alert("!!!");
      $.get(
             "/Login_demo/login",
              "username=" + username+"&password="+password,
              function (data) {
                alert(data)
              },
              "text"
      );
  })
</script>
</html>
